package com.kgc.novel.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.*;

/**
 * @author Wang乐俊.
 * @date 2023/5/9 0009 15:48
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("book_record")
@Api(tags = "用户阅读记录类")
public class BookRecord implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 用户ID；关联用户表
     */
    @ApiParam("用户ID")
    @TableField("userId")
    private String userId;
    /**
     * 图书Id；关联图书表
     */
    @ApiParam("图书Id")
    @TableField("bookId")
    private String bookId;
    /**
     * 内容id；关联内容表
     */
    @ApiParam("内容id")
    @TableField("chapterId")
    private String chapterId;
    /**
     * 阅读时间
     */
    @ApiParam("阅读时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Data create_time;
}
